package com.adcc.ags.msgStore.entity.db;

import com.google.common.base.Strings;

/**
 * DB信息
 */
public class DBInfo {

    public static DBInfo instance;

    private DBInfo(){}
    /**
     * 单例模式
     * */
    public synchronized static DBInfo getInstance() {
        if (instance == null) {
            instance = new DBInfo();
        }
        return instance;
    }

    // url
    private String url = Strings.nullToEmpty("");

    // 用户名
    private String username = Strings.nullToEmpty("");

    // 状态
    private DBState state = DBState.DISCONNECTED;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public DBState getState() {
        return state;
    }

    public void setState(DBState state) {
        this.state = state;
    }
}
